package org.example.basic.day04;

public class Demo接口 {
    public static void main(String[] args) {
        method(new Tom());
    }
    public  static void method(Cat cat){
        cat.eat();
    }
}

/**
 * 接口
 */
interface Cat{
    void eat();
}
class animal{
    public void run(){
        System.out.println("我跑的好快！");
    }
}

class Tom extends animal implements Cat{
    @Override
    public void run() {
        super.run();
    }

    public void eat(){
        System.out.println("我是熊洋，我是一只猫。");
    }
}
